<?php

namespace ticket\modules\frontend\models;

use Yii;

/**
 * This is the model class for table "tk_ticket_quota_rule".
 *
 * @property int $qid
 * @property int $tid
 * @property string $place_sta_time
 * @property string $place_end_time
 * @property int $min_sta_order
 * @property int $max_end_order
 * @property int $max_order_num
 * @property int $phone_day
 * @property int $bug_ticket_num
 * @property int $phone_day_num
 * @property int $advance_num
 * @property string $online_time
 * @property string $offline_time
 * @property string $day_end_time
 * @property string $is_oragin
 * @property int $age_rule_type
 * @property string $create_time
 */
class TicketQuotaRule extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'tk_ticket_quota_rule';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['tid', 'phone_day_num'], 'required'],
            [['tid', 'min_sta_order', 'max_end_order', 'max_order_num', 'phone_day', 'bug_ticket_num', 'phone_day_num', 'advance_num', 'age_rule_type'], 'integer'],
            [['place_sta_time', 'place_end_time', 'online_time', 'offline_time', 'day_end_time', 'create_time'], 'safe'],
            [['is_oragin'], 'string'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'qid' => 'Qid',
            'tid' => 'Tid',
            'place_sta_time' => 'Place Sta Time',
            'place_end_time' => 'Place End Time',
            'min_sta_order' => 'Min Sta Order',
            'max_end_order' => 'Max End Order',
            'max_order_num' => 'Max Order Num',
            'phone_day' => 'Phone Day',
            'bug_ticket_num' => 'Bug Ticket Num',
            'phone_day_num' => 'Phone Day Num',
            'advance_num' => 'Advance Num',
            'online_time' => 'Online Time',
            'offline_time' => 'Offline Time',
            'day_end_time' => 'Day End Time',
            'is_oragin' => 'Is Oragin',
            'age_rule_type' => 'Age Rule Type',
            'create_time' => 'Create Time',
        ];
    }
}
